<?php
namespace Home\Controller;
use Think\Controller;
/**
 *  Form
 */
class FormController extends Controller{
	/**
	 * add
	 */
	public function add(){
		
		$this->display();
	}

	/**
	 * insert
	 */
	public function insert(){
	    $form = D('Form');
	    if( $form->create()) {
	    	$result =  $form->add();
	    	if($result) {
	    		$this->success('数据添加成功！');
	    	}else{
	    		$this->error('数据添加错误！');
	    	}
	    }else{
	    	$this->error($form->getError());
	    }
	}

}